home *** CD-ROM | disk | FTP | other *** search
- /*_________________________________________________________________________________
-
- File: XTIShell.h
-
- Apple Computer, Inc.
- Copyright (C) 1992,1993. All rights reserved.
-
- This file contains the includes for the XTI Shell
-
- Revision History:
-
- __________________________________________________________________________________*/
-
-
- #ifndef _SHELL_H_
- #define _SHELL_H_
-
- #include <QuickDraw.h>
- #include <Controls.h>
- #include <TextEdit.h>
- #include <Memory.h>
- #include <OSUtils.h>
- #include <ToolUtils.h>
- #include <Resources.h>
- #include <Lists.h>
- #include <TextEdit.h>
- #include <Fonts.h>
- #include <Values.h>
- #include <Windows.h>
- #include <Packages.h>
- #include <String.h>
- #include <Strings.h>
- #include <Dialogs.h>
- #include <RomDefs.h>
- #include <Slots.h>
- #include <Scrap.h>
- #include <Menus.h>
- #include <Devices.h>
- #include <StdLib.h>
- #include <SysEqu.h>
- #include <Folders.h>
- #include <Palettes.h>
- #include <QDOffScreen.h>
- #include <Files.h>
- #include <Errors.h>
- #include <Types.h>
- #include <Timer.h>
- #include <AppleTalk.h>
- #include "XTIShell_r.h"
- #include "X25_Addr.h"
- #include "XTI.h"
- #include "TAdev.h"
-
-
- /********************************************/
- /* defines for log messages */
- /********************************************/
-
- #define kMaxLogStrLen 60
- #define kNumLogStr 6
-
- #define kDialLog 1
- #define kAnswerLog 2
- #define kConnectLog 3
- #define kConnDownLog 4
- #define kConnClearLog 5
- #define kConnReqFailLog 6
- #define kPasswordLog 7
-
- /****************************************************************/
- /* ReOpenTMRec used for time manager */
- /****************************************************************/
-
- typedef struct ReOpenTMRec {
- TMTask tmInfo;
- };
-
-
- #ifndef __cplusplus
- typedef struct ReOpenTMRec ReOpenTMRec;
- #endif
-
- typedef struct ReOpenTMRec* ReOpenTMRecPtr;
-
- /****************************************************************/
- /* dtRec used for deferred task manager */
- /****************************************************************/
-
- typedef struct dtRec {
- QElemPtr qLink;
- short qType;
- short dtFlags;
- ProcPtr dtAddr;
- long dtParm;
- long dtReserved;
- };
-
-
- #ifndef __cplusplus
- typedef struct dtRec dtRec;
- #endif
-
- typedef struct dtRec* dtRecPtr;
-
- /**********************************************/
- /* XTIacfg passed between interface and atlk */
- /**********************************************/
-
- #define kMaxPWLength 8
-
- typedef struct XTIacfg {
- Boolean isCalling; /* is the call/answer mode field */
- Boolean autoReconn; /* is the reconnect check box */
- char password[kMaxPWLength+1]; /* password as pascal string */
- TTSAP localAddr; /* local address field */
- TTSAP remoteAddr; /* remote address field */
- };
-
- #ifndef __cplusplus
- typedef struct XTIacfg XTIacfg;
- #endif
-
- typedef struct XTIacfg* XTIacfgPtr;
-
- /****************************************/
- /* ADEV signature Record */
- /****************************************/
- //
- // You may want to change this to contain your own link
- // specific information. It is internal to the adev.
- //
-
- typedef struct TADEVSigRec {
- short id;
- char port;
- char slot;
- };
-
-
- #ifndef __cplusplus
- typedef struct TADEVSigRec TADEVSigRec;
- #endif
-
- typedef struct TADEVSigRec* TADEVSigRecPtr;
-
-
- /****************************************************************/
- /* CShellGlobals contains the globals used in the C routine */
- /****************************************************************/
-
- typedef struct CShellGlobals {
- TMTask tmInfo; /* this must be the first field to get */
- long myA5; /* the address when using the time manager */
- Boolean bindComplete; /* true if the bind has completed */
- short bindErr; /* the bind error */
- Ptr logStr[kNumLogStr]; /* array of log strings */
- ReOpenTMRecPtr openTMRec; /* time manager record for open */
- dtRecPtr mydtRec; /* deferred task manager record */
- XTIacfg theConfig; /* the configuration record from Router Manager */
- int fd; /* the endpoint file descriptor */
- Boolean isConnected; /* true if we are connected */
- Boolean isFlowControlled; /* true if we are flow controlled */
- Boolean isSending; /* true if we are sending */
- Boolean waitMoreData; /* true if there is no more data waiting to be read */
- Boolean isReconnecting; /* true if we are reconnecting */
- Boolean toldConnDone; /* true if we have already told AURP the connection is done */
- short sendBuffLen; /* the actual size of the buffer we are sending */
- Ptr dataToSendPtr; /* pointer to the sendBuff that we can manipulate freely */
- Ptr sendBuffer; /* the send buffer */
- short rcvBuffLen; /* the current length of the receive buffer */
- Ptr receiveBuffer; /* the receive buffer */
- Boolean waitForBind; /* true if there is a bind outstanding */
- };
-
-
- #ifndef __cplusplus
- typedef struct CShellGlobals CShellGlobals;
- #endif
-
- typedef struct CShellGlobals* CShellGlobalsPtr;
-
- /********************************************/
- /* XTIShellVars must be same as in .a file */
- /********************************************/
-
- #define kNextIR 2
-
- typedef struct XTIShellVars {
- CShellGlobalsPtr cGlobals; /* Ptr to variables used in C routine */
- short HopCntWght; /* hop count weight */
- char remoteAddr[16]; /* remote address as pascal string */
- long AURPWriteEntry; /* AURP LAP write code entry point */
- long AURPRefNum; /* AURP refnum */
- long NextIRBlk; /* next IR */
- long lineSpeed; /* faked line speed to tell the router */
- ProcPtr AURPDispatch; /* aurp dispatch routine */
- short OurDI; /* our domain identifier */
- long otherNode; /* domain identifier of other router */
- short maxRPktSz; /* maximum packet size */
- WDSElement* wDSPtr; /* WDSPtr for XTIWRITE */
- Boolean rcvBufAvail ; /* set flag if receive buffer is available */
- char rcvPktsWaiting; /* number of packets waiting to be read */
- char XTIFlags; /* flags for this atlk */
- char OurPortId; /* Our port id */
- char OurSlotId; /* Our slot number */
- };
-
- #ifndef __cplusplus
- typedef struct XTIShellVars XTIShellVars;
- #endif
-
- typedef struct XTIShellVars* XTIShellVarsPtr;
-
- /* ATLK calls imported from .a file */
- extern Ptr GETSYSMEM (long blockSize);
- extern void CONNDONE (long errResult);
- extern long GETMYA5 (void);
- extern void SETMYA5 (long theA5);
-
- extern void memcpySetLongMove (long);
-
- #endif _SHELL_H_